<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
   /******************************************************************************
     Copyright:: 2020- IBM, Inc

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  *****************************************************************************/
-->

<html lang="en">

<head>
    <script src="../../../src/oaa-a11y.js"></script>
    <script src="../../../src/scripts/util-rpt.js"></script>
    <script src="../../../src/scripts/util.js"></script>
    <script src="../../../src/scripts/cross-browser-util.js"></script>
    <script src="../../../src/wai-aria/aria_definitions.js"></script>
    <script src="../../../src/rules/rpt-ariaLabeling-rules.js"></script>

    <script>
        // Need to set this to simulate setting being set by tools
        document.PT_CHECK_HIDDEN_CONTENT = true;
    </script>

    <script type="text/javascript">
        function runRule() {
            var passed = OpenAjax.a11y.getRule("Rpt_Aria_MultipleArticleRoles").validate(document.getElementById('body'));
            console.log("Hidden content SHOULD NOT BE checked so violation should NOT trigger, expecting true: " + passed.result);
        }
    </script>

    <title>RPT Test Suite</title>
</head>

<body id="body" onload="runRule()">

    <div role="navigation">
        <a href="#navskip" alt="skip to main content"> NavSkip </a>
    </div>

    <div role="main">
        <a name="navskip"></a>

        <div role="article" aria-labelledby="hd1">Text</div>
        <div role="article" aria-labelledby="hd1">Text</div>
    </div>
    <script type="text/javascript">
        //<![CDATA[
        if (typeof(OpenAjax) == 'undefined') OpenAjax = {}
        if (typeof(OpenAjax.a11y) == 'undefined') OpenAjax.a11y = {}
        OpenAjax.a11y.ruleCoverage = [{
            ruleId: "1166",
            passedXpaths: [],
            failedXpaths: [
                "/html/body/div/div",
                "/html/body/div/div[2]"
            ]
        }];
        //]]>
    </script>
</body>

</html>